'use strict';

function collect_min_number(collection) {
  let t;
  for(let i=0;i<collection.length-1;i++)
    {
      for(let j=0;j<collection.length-1-i;j++)
        {
          if(collection[j]<collection[j+1])
          {
            t=collection[j];
            collection[j]=collection[j+1];
            collection[j+1]=t;
          }
        }
    }
  return collection[collection.length-1];
  
}

module.exports = collect_min_number;

